package test.telnet;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.Socket;

public class TelnetClient {

	public static void main(String args[]) throws Exception {
		
		Socket soc = new Socket("yvas1650.inetpsa.com", 23);
		String Command;
		
		DataInputStream din = new DataInputStream(soc.getInputStream());
		DataOutputStream dout = new DataOutputStream(soc.getOutputStream());
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		Command = br.readLine();
		dout.writeUTF(Command);
		
		System.out.println(din.readLine());
		
		soc.close();
		din.close();
		dout.close();
		br.close();
	}
}
